added logging for debug info