FileReader needs a state pointer too