Close file in get_gpio_pin