Use better syntax, add exception debug output.