Change done method to be called after the file iteration.