move config before MainWindow