Better error handling in boot.js