Fix read file error when folders are not created