Bug fix to resolve issue when file name contains a space