Added check for save