Fixed errors caused by awk not finding figfile