fix log detection