added os imports for path handling