Arranged the code to be more simple a little.
Removed the debugging log message.
Improved the toast to show the application name.