Removed debugging, added try/except.