[IMPROVED] Added logging failed SQL queries to payouts