Implemented logger logic, small fixes