Adding support for file with space in the name and changing root folder on the fly