overwrite output file if needed