CLI crashes if invalid app is specified

Closes #1