restructuring file copy