replaced os.sep.join with os.path.join