only throw pickle error message in debug mode