Issue#365 global err setup