Added List comprehension and corrected file creations