construct log and config file names correctly