added database port check