Dynamic handling of video thumbnail images, error handling, code refactoringHandled extra conditions for ubuntu version