add library modules to run commands and copy with error checking