[log,override,main,tool] move logging functionality into separate file