Adds doc in commands
Fixes return codes
Changes wd and moves log