close device file