Added code for file student register. Not working as expected.