updated logging a bit