write dependencies file
fixed synchronization issue