try converting err to string