Added checking for file reloading.