On Thu, Feb 5, 2015 at 10:30 PM, Geoffrey Bays <charioteer7@gmail.com> wrote:
Francesco:

Unfortunately, using withFile I get the same error as before with handles: hPutStr: illegal operation (handle is closed).


This error suggests you're forgetting to reopen your file in WriteMode once withFile closed it (you did read the documentation of withFile ?). Trying to write on a closed handle is an exercise in futility.

--
Jedaï