added lib.utils.debug.js along with tests