Try/catch for db connections