check log is running. check if else