replaced print statements with warnings

Print statements are pretty ugly and uncontrollable. On the other hand warnings may be muted or intercepted by logging system.