Buf fix for too many file opened