improve error handling for absent database