add files to gitignore
refactor debug() calls

as debug module is noop for not enabled namespaces additional 'if' is not
required
bind emit to correct this arg