added "else if" for file - default file value was making both url and file process