improve file loading