move RegisterFile to a new source file