move STDERR re-opening to a better place
drwxr-xr-x lib