added prepublish directive for npm
fixed async issue with db inserts
updated package file