added recognition for comment lines and setprompt; added error handling for setprompt