Changed loop, to itterate trough file list using function enumerate, not through indexes of them