Remove unwanted empty line at end of output