Project name now filtered, fix for initial command

Initial command wasn't being stripped so it always complained about an
unknown character.
Also added an error function to avoid reusing code all over.