use prefix in preference to cwd