Strips out trailing newlines in files
Using log instead of fmt