writeMessageOnPage in addition to logging.