Issue/884 proper logging

Implement logging via log4j instead of System.out.* calls
Why is this check needed here and not elsewhere?