Actually make "raw" input and output work + added option to enforce "raw" input or output.