trying to get value from not defined
error handling during writing