Use local_pic_dir in the program loop also.
Fixing merge conflict.