fixes in file copy