file rename and fill registry at beginning