printing python errors to terminal