Bug fix for FileCopy