Changed logging a little bit to enable easier modifications