fix error caused by trying to open config before it exists