Splitting off file sync code to a separate class.