Minor cleanup, added match result to debug output in isFrameValid function