Replaced cat with echo when appending to files