NSW govt slammed over 'egregious' failures