Updated usage.py to check for existing records in SQL to prevent errors caused by the delay of fetching a SQL result and then running the if condition in Python