Updated docs and wrapped debug statement to avoid performance hit when logging not desired