REV: added _write_to_log()