Changed path + file to os.path.join for datadir. still there are several missing