bug fixes; a lot of logging improvements (esp. for forks)