Improve logging and fix arm64 warnings when printing integers with %d