fix leak in shmdata reader
fix printf issues