The code is now a function in the 'catalog' module and checks for the existence of the file are now performed.