Added Error Handling to ouput.py (to handle returned strings or tuples)
Trex-2 Django-fied