Should check for error value in case anything wrong happens.