Fix error handling in CLI mode, use STDERR and non-empty exit code (#1489043)
Fix exit code on bootsrap errors in CLI mode (#1489044)
Fix possible collision in generated thumbnail cache key (#1489069)