adding missing var to fprintf ><