Sorting completed todos to the end of file.