Abstracted file pattern restriction from Document class