added getFile method to Resource.java