improved logging, added registration