Throw error when file doesn't exist; Made parseInt not always return the maximum value