Fix bug of loading wrong PDF and IDF files