Added error handling for schema connections