MDL-40051 core_lib: replaced add_to_log calls related to file uploads with events
MDL-40051 core_lib: replaced add_to_log when failing to send email