Updated check for file loading.