added option to write log to file