- Changed prev_name into a buffer so that there is no chance that its