Removing extraneous newline from EOF