Fix logging to give more information