Better error reporting in server.pl