Updated error handler and detached service creation