Add try catch for connect database