Fixes to file loading.