allocate config_file and input_file on heap instead of stack.