Removed print mess and replaced it with logging