Check the return value of save before checking error