@Override
    public void close() {
        try {
            if (this.connection != null)
                this.connection.close();
        } catch (Exception e) {
            this.writeError("Failed to close database connection: " + e.getMessage(), true);
        }
    }