Add mode value
Check mode and branch
Dumped mode
Error checking