modify debugging and error messages