Added maxOpenFiles option that does partial merging if neccessary to prevent excessive number of open files.