move out check_for_fatal_issues
add test for keys and data having different size
consolidate sys.exit()