checks and print final status of script