Make main() return an exit status code
Add progress bar