fix(cli): output must be passed as string
refactor: cleaner code