fix logging: use debug, info, error order properly