set a temporary filename before saving it. Fix #541