Added different logging for console and for logfile