Adding file closes and a dep in the makefile for single threaded make