Some minor fixes to event logging function and to acceleration / compass demo.