Better support for spawn errors encountered during generation (for ex, PDFs through wkhtml) + general refactoring.