in reply to readdir on files being modified

You have to use opendir instead of open.
Boris