Added check for server start and stop