add logging for debug