added logger, fixed a few bugs, added first log mesages