This is not a good practice. Either please use ``flexmock.flexmock`` to mock around the config file (create a fake object that can be written to) or use ``tmpfile``.