stat.st_size is off_t not size_t, so need to cast to size_t before compare it. Change-Id: I6b742746fbb9f254701fc91e515c293f93f912c5