Fix required handling for file input