add projectDir as second argument
add argument to set projectDir and filter out external files when export json