debugged spot_launch.pl script