Updated the sync function to consider the operating system before calling the md5 command