Add error handling to launch.lua