Updating the script to check for insufficient logs