Added logging of actions.