wip
Stop leaving files open everywhere