Add ajax error handler, change 'Loading...' message to 'Generating...'