Use file to track tmp files instead of array - fixes previous commit