Coded error checking

Coded error checking for prompts