Opening source file causes File not found exception

Hi, I just started using guild and I’m trying to integrate it with an existing project.
I have the following directory structure:

├─ configs/
│  ├─
│  ├─
│  ├─
├─ utils/
│  ├─

Where the config files contain something similar to

from utils.base_config import BaseConfig

class Config(BaseConfig):
    class Model:
        architecture: MLP
        class Parameters:

if __name__ == "__main__":

and among other things does this

import __main__

class BaseConfig:
    def init(cls):
        with Path('configs/').open('w+') as f:
            f.writelines([f'from .{Path(str(__main__)).stem } import Config'])

Now, when I run guild run configs/ I get the following error:

Traceback (most recent call last):
  File "C:\Users\username\PycharmProjects\project\configs\", line 56, in <module>
  File "C:\Users\username\PycharmProjects\project\utils\", line 13, in init
    with Path('configs/').open('w+') as f:
  File "C:\Users\username\.conda\envs\project_env\lib\", line 1252, in open
    return, mode, buffering, encoding, errors, newline,
  File "C:\Users\username\.conda\envs\project_env\lib\", line 1120, in _opener
    return, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'configs\\'

Then, when I look into the sourcecode directory of the run I see that only, and cfg2.pyare present and the directory structure is not preserved (i.e. the three files are not under configs). Any idea on how to solve this?

Also, I was wondering how I could log the configuration file. I tried playing with flag-dest:config but couldn’t manage to make it work.