Added Locked flag to service domain object to prevent services to start

Also fixed bug with snapshot if snapshot gets prematurely exited.