check error_string_n size and truncate if too short