Adds check to make sure input file exists before reading