fixed bug in file transfer