York to Harrogate rail upgrade at risk