add exception handling, and question about plot_weight_features