Added some logging and abort indexing on mysql error