fix the case where file does not exist