mv to vla for histfile path string...means no need to free() on each err case. strdup gives caller pointer