your printlog is an ISR (interrupt service routine) and should end with a return not a goto main. Try that