change debug print statement to debug logging