Fixed a bug when creating the path for the log file. Have to quote it in case it has special characters like spaces