corrected logger to support error order