Added file length scan and file loading.