security mode determined on hadoop conf not on system environment
code cleanup and bugfix