fixed time computation for ended jobs
fixed error handling in ejobs script