Added check to ensure DATA_DIR can be found