ensure block

file.close in ensure block caused the original cause to be buried