fixed divide by zero in progress. Added viewdir script