throw exception if no file