use logging instead of stdout