updated to use os.sep for file path conversion