Added debug statements and caching mechanism for hadoop installation