Added a functionality to get the max delay in each execution - write it to a file in app_data. Also fixed some small things