Fix newline at end of output after running a command