Modified verision of InputFormat and Recorder.