use %zu rather then %ld so that size_t is formatted properly