%d is being read weirdly
Logging to file and terminal works