Large modification of files to include logging capabilities