|"Whilst trying to copy data to a file"|
This makes no sense. Are you trying to burn a file to a disc or are you trying to modify a data file already on the disc?
If it's the second, you cant modify files on a disc. You would have to move the file back to your hard drive, modify it, then burn it back to a disc.