using logging instead of print because of gui & other hosts