better error message when empty string write key is used