Fixed formatting errors
Changed output listing print statements to print to sys.stderr