Fix path for default settings
Refactor construction of the command and fix invocation issues.