refactored os.split usage to os.path.join usage