Merge "append2simg: write to temporary file"