created init_io() function to restore gpios