added error handling for database port in class Configuration