Improved synchronization for generate lock on user-modified generated files