add check in getResourceFrom - @eluleci