Added log cleanup to CopyFromStaging