prevent endless loop when creating upload folders on demand