reverse: input and output file must differ