Don't stick a function that might "do something" (download files) inline like this.

Put an if block above the system call.