Improve logging & exception handling of elastic functions.

3 jobs for master in 5 minutes and 17 seconds (queued for 1 second)