ensure new line at file ends