Better error logging for sql scripts.