If you can provide more context or specify what software or game this relates to, I could offer more targeted advice.
: Use flock on a per-binary lock file.
The "better" way to handle fgoptionalmpfilesbin is to Don't let your software dictate a messy organization. By using Symbolic Links or a Virtual File System , you maintain the "Optional" flexibility without the performance tax of a bloated "Bin" directory. fgoptionalmpfilesbin better