disabled output if no config file found. refactored code