fixed bug where an error would be thrown when copying files