Another small Bugfix
Added logging - now stroing all output in log.txt