fixed getUserDirectory function to return only chunk is done