Better error handling for GhostScript