file api working except for recursive folder deletion