Automatic troubleshooter