partial trouble script for investigating script errors