for the curious: the paste above fails because 'stat' is implicitly declared (with double I'm guessing). Declaring its signature beforehand fixes it.