XD-857 Generalize FileModuleRegistry -> ResourceMR

Introduce dedicated Exception for IO

Moved name first

Add assert and enhance type safety