Fix logging and a few service bugs.