Add validation to the db connect, and try to connect to the db