Fix #20 by make acceptFileUpdate synchronized