improve logging
deserialize only when string