calculate relative path by cwd instead of main_dir