Prevent saving binaries to the same file by several threads

refs #124