improving logging a bit