Write contents of recieved data to file for debugging