added more exception handling for twitter