Change log command to be synchronous