Change erroneous logging.error call to logging.debug
Run DELETE FROM queries correctly (this was missing since refactor)