Fix error handling
Components for closing a database connection or deleting the database