enhanced error checking for start.pl