Because toFile can also be a STDIN and this type cannot be marshaled I decided to added individually outside the scope of switch block.