logging: added event log, updated error log, fixed logging bugs