Improved logging of errors. Introduced deployment as a different stage from provision.