This should be done with a logger instead