bugfix for writing correctly to file in the receiver