Fix usage of setwd and data