Cleaning up end of file newlines and logs