Adds Backup functionality in case of failure. Cleans to PEP8 standards.