Refactored synchronization mechanism
Improved error messages