Optimized file descriptor usage