[jhc] Re: darcs patch: try to abstract IO a bit