wrap writes to hdf5 files with lockfile to avoid corruption by concurrent writes
(e.g. multiple users running with project files on a shared network drive)