added file eror handlers