Address too many open files and wrong object name