Added file name length check to rename file method.