Fix closing of storage file