add config, check for open file