added URL validation for remote files