Correctly define application class path (required by applications like spark)
Add delay to application cleanup