Fixed errore when source_dir is not provided