changed fakeswitch_hadle_io and fakeswitch_init parameters for portability