bugfix: potential segfault in omfile under heavy load