add core fn for file