added AVAsset initialization and data writing