refactored video id parsing, improved logging