syn-write fixed, moved locks around in sys_write funciton