working --output and --print