Added frame capture success check