unable to modify lib/upload exports object in memory