Use log statements instead of println and make them work.