better handling for the local source dir case