def append_file_data(_dir, data)
      File.open(to_path, 'ab') { |file| file.write(data) }
    end
def append_file_data(_dir, data)
      File.open(to_path, 'ab') { |file| file.write(data) }
    end
rubocop:enable Metrics/MethodLength