Added error to forecast function.