Added while loop for whole folder
Removed a pointless line