Fix file saving in NBE format