Added handling of long running processes