Cleanup debug messages
Several fixes

* Update doc
* cleanup ret vs rc
* reorder chmod()/chown()
* check catia character mapping option
Add TODO