added url or file input checking