updated import script for postgresql, fixed issues for mongo import