A judge described Liam James' actions as 'grossly stupid'