Added log collection; + minor fixes