adding log-based debugging features