updated connect dbi script to print out error