adding logging to troubleshoot