fix: throw error when image saving error