Fix exceptional resource leak CID 18189
Move file checkers to a new file utilities class