Moved blast system calls into a function