adding error handling to manage.py

also, I need a better name for this file.