Changed prints to logger