Made changes to purge.py to improve logging and exception handling. Added logic to handle multiple paths