Allow context to autoclose the open file