read resources from files