Added logging and registering.