Updated app task logic
Modified code lock and added execution pause