Adding guards to service startup