fixing the logging aspect