Check if a file is valid before banning it