complete file copy code