add max open files
Merge pull request #334 from matiu/bug/max-openfiles

add max open files