Added logging, special case unmarshal for empty input