Setup for background job, better_error support, changed script to handle init db.