diagnostic logging moved up