The log file will be flushed to disk when the load script finishes, so you cannot do this in the load script directly. You could have a second task started on fail of the first that extracts the load log and sends the email. Or else use an external process.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein