Accounting to MySQL DB on failure