As someone who works on a lot of projects that are shared with others, but where the built-in collaboration features are lacking/don't work:
When a file is saved create a checksum. Before a file is saved, re-read the file and see if the checksum of the current file matches the checksum from when you opened it. If it matches, save as normal, if it doesn't match, at least alert the user that the original file has changed and make them either confirm the save or give the option to do a "Save As..."
We have run into a number of instances where User A opens a file, then User B opens a file, User B then saves and closes the file followed by User A. As a result of this, User B's changes are obliterated but there is no indication that this has happened. This is mostly an issue when files are being shared via cloud service that integrates into a local machine (Dropbox, Google Drive, etc)