Improve audit check function.