added the case where no file exists initally