moving file helper methods from Utils to UtilFile