working set up to log to file