added more comments, added error checking for video/audio file.