Writing binary data to the log file