use default resource or File where resource is not given