better sintax to reuse warning log