Fix LoadCommand adding an extra newline at the end of a file