fix error in reading nonexistant file