updates for rhel6
oldupdates from slac... but i have stopped using this file
added more output, iterating over subdirectories
added exception handling in case of 0 entries