flush logs before executing any command, fixes prymitive/upaas#60