@yifan-gu The 'if' here is good because error should be logged later.