Improved the filename mapping.