some error handling for newline at eof for inputfile