Error handling, postgreSQL fix, and travis CI for postgreSQL