Added startup and shutdown checks