Removes duplication of swap files handling

Hey there!
This removes the swap files handling duplication.