Fixed Bug With Leaking File Descriptors