added flag for file input