I am not sure why it should happen but my assumption is the folder is returning but str does not have the necessary buffer to hold the data.