working on a bug with debug logging not working for the fprintf, but working for the printf