Added opportunity to write log into arbitrary file