Print replaced by logging in sandbox, train_extensions and training_algorithms folders

Continuation of the pull request #718 for issue #41.