bug fixed with spaces in file and directory names