Adding debug output to ball sample