Added error logging to show generated SQL (useful for debugging)