Avoid runtime exception when file doesn't exist (#2441)
Avoid runtime exception when file doesn't exist (#2441)

* Avoid runtime exception when file doesn't exist

* Update the check based on feedback

* Revert the old fix

sxjscience/tvm,Laurawly/tvm-1,dmlc/tvm,tqchen/tvm,Huyuwei/tvm,dmlc/tvm,tqchen/tvm,tqchen/tvm,dmlc/tvm,dmlc/tvm,Huyuwei/tvm,Huyuwei/tvm,Laurawly/tvm-1,Laurawly/tvm-1,Huyuwei/tvm,tqchen/tvm,Laurawly/tvm-1,tqchen/tvm,sxjscience/tvm,Huyuwei/tvm,Laurawly/tvm-1,Laurawly/tvm-1,Laurawly/tvm-1,Huyuwei/tvm,Laurawly/tvm-1,dmlc/tvm,tqchen/tvm,Huyuwei/tvm,dmlc/tvm,sxjscience/tvm,Laurawly/tvm-1,sxjscience/tvm,sxjscience/tvm,sxjscience/tvm,Laurawly/tvm-1,tqchen/tvm,tqchen/tvm,sxjscience/tvm,Huyuwei/tvm,Huyuwei/tvm,dmlc/tvm,dmlc/tvm,dmlc/tvm,tqchen/tvm,tqchen/tvm,sxjscience/tvm,sxjscience/tvm