Check return value of putenv