implemented output file transfer