Added functions for renaming files based on values stored in oldnames_db