add error check for draft saving