Added logging during failed attempts.
Using 'extended insert' syntax for MySQL bulk inserts.