Input before output.
General IO functions act as multiplexer between file formats.
Also change IO order in function calls.