Improve file format handling of GetNanopub