Remove flag for denoting task execution in handle_failure(). Instead use the
start time of task execution to determine if output files need to be evicted.
Catch memory allocation failures before access.
Also update the functions to return a value signaling this failure.