Move lib load out of loop.