Gets the activity and location of the user and saves it to a file