Adding function to store user data in seperate file