add support for file input