Better error handling in dancerqr.pl