change source directory to valid path