Generic file fetching mechanism