Add handler for IO to generate pure functions