Moved status printing code to main script