Appending outfile instead of erasing it