Logging and trying to wrap into node module