Fix bugs. Don't exhaust file limit.