Added timestamp to log and added sync lock