implementing errorno and errorstr