Incomplete work on a file condensing script