add --beautify option
more stable iframe tests
error handling tweaks