fix from peter for arf writing files