Add exception when cannot open file