Is there any reilable way to create a file with Delphi if not exists?

I am coding an app for windows and would like to save and load all states of components that created runtime. To do that, I am using ReadComponent way and it is successful if settings.dfm file exists.

Otherwise I would like to create a blank one but every trying results Cannot open file error (because it is not exists).

FormCreate event is like below:

var
dfm, s : TStream;
begin
  if FileExists(Extractfilepath(ParamStr(0)+ 'settings.dfm')) then
  begin
    dfm := TFileStream.Create(Extractfilepath(ParamStr(0)) + 'settings.dfm',fmOpenReadWrite);
    dfm.Seek(0, soFromBeginning);
    s := TMemoryStream.Create;
    ObjectTextToBinary(dfm, s);
    s.Seek(0, soFromBeginning);
    SunucuForm.DestroyComponents;
    s.ReadComponent(SunucuForm);
    dfm.Free;
    s.Free;
  end
  else
  begin
    dfm := TFileStream.Create(Extractfilepath(ParamStr(0)) + 'settings.dfm',fmOpenReadWrite);
  end;

I tried below methods to create file if not exists but no success.

explained here, here and some others, even when checking file existence (on FormCreate event) and saving on exit(on FormClose event) program gives Cannot open file error. And I really couldn't find a way to solve this problem.