def self.read_answers_file file
answers_hash = {}
unless File.exist?(file)
raise "ERROR: Could not access the file '#{file}'!"
end
begin
logger.debug("Loading answers from #{file}")
answers_hash = YAML.load(File.read(file))
answers_hash = {} if !answers_hash.is_a?(Hash)
rescue SignalException => e
raise
rescue Psych::SyntaxError => e
raise "ERROR: System configuration file '#{file}' is corrupted:\n" + e.message +
"\nReview the file and either fix or remove it before trying again."
end
answers_hash
end