Fix some assign handling (resource counting on assign, cmdline handling)
fix path break out handling, close some more resources on error