demo for file api