save fd into struct to prevent GC