client writes the received file to the specified outfile