Cleaned up the Rust CopyFile snippet