Remove unwanted new line at file end