Fixed file copy issue