Add logging

we should mention that it is important here that the `FileHandler` is attached after the relogging