Adding Stop check.

When the program is stopped, entries in db get status set to false.