Judge allows Tonawanda Coke to stay open