Change file output to be append instead of write