Shuffle file properly closed