Changes write_data to write_raw_data