file reopening when program changes