implemented logging a bit more