Added function for debug output.