closing fileSys is file openWrite/flush fails