         }
 
         guard image.TIFFRepresentation?.writeToFile(tmpImagePath, atomically: true) == true else { return }
+        // create AVAssetExportSession each time because it cannot be reused after export completion
         guard let session = AVAssetExportSession(asset: playerItem.asset, presetName: AVAssetExportPresetPassthrough) else { return }
         session.outputFileType = "com.apple.quicktime-movie"
         session.outputURL = NSURL(fileURLWithPath: tmpMoviePath)

        autolayout("V:[posterView][positionsLabel][createLivePhoto]-p-|")

        setupAspectRatioConstraints()
    }

    private func setupAspectRatioConstraints() {

                for path in [tmpImagePath, tmpMoviePath] {
                    let _ = try? NSFileManager.defaultManager().removeItemAtPath(path)
                }
                self.exportSession = nil
                self.updateViews()
            }
        }
        exportSession = session
        updateViews()
    }

    private func showInFinderAndOpenInPhotos(fileURLs: [NSURL]) {
