scanfile: fix parsing for the latest formats