Added logger class and better debug info output.