Overlay refactoring: Clean up critical section on exit
Overlay refac: Additional error handling