I don't see it mentioned, so thought I'd point out that /.BGV/ might be buggy for two reasons:
Since . matches any character, /.BGV/ would match for example "foo-BGV".
There's no anchor at the end, so it would match anywhere in the filename, for example "foo-BGV.txt".
It's possible that that's what was intended, but it likely should be /\.BGV\z/ if it's meant to be a file suffix, and maybe even /\.bgv\z/i if it isn't case-sensitive.