modify the exit button and upload tex