Program exits cleanly.

Centralized call to os.Exit() so that the program exit cleanly.
log.Fatal() will call os.Exit() and the program will terminate at spot
without running any deferred statements. Although we do not have any
issues right now, but it is a good practice to reduce abnormal exit.