implemented logger for debuggin