Added a function to write a RAW frame back to the RAW file