Pass error to callback instead of throwing
Add command for linux/freebsd
Missing semicolon
Refactor var declaration