fixed log to be synchronized and added sysout