extract printing of status to a separate module