fixed FormatException bug when file is not found