NOT WORKING: added training for temporal pooler. Changed sys.exit to be 1 for failure case