@Override
    public boolean checkTable(String table) throws MalformedURLException, InstantiationException, IllegalAccessException {
        try {
            //Connection connection = getConnection();
            this.connection = this.getConnection();
            Statement statement = this.connection.createStatement();

            ResultSet result = statement.executeQuery("SELECT * FROM " + table);

            if (result == null)
                return false;
            if (result != null)
                return true;
        } catch (SQLException e) {
            if (e.getMessage().contains("exist")) {
                return false;
            } else {
                this.writeError("Error in SQL query: " + e.getMessage(), false);
                e.printStackTrace();
            }
        }


        if (query("SELECT * FROM " + table) == null) return true;
        return false;
    }