Only show the success message when the script returns