Network Rail told: Improve or face competition