error detection for ffmpeg via sh script