combined shark mem and disk code path, and added logging of results to file"