Exit if selected database does not have any tables
Add function exitWithMessage to terminate program
Use db.Ping to test connection