added garbage collector to file scan script