store message to the file