more refactoring in reef-io (logging, code style, minor fixes) - not finished yet