Cosmetic changes
Removed useless conditional on failure
Removed useless test and added asserts to cmd.c
Assert guard log.c