Removing extra line at end of file