nested function inside moveFile

nested function inside moveFile