Introduced error reporting to the PNG generating scripts.