Error checking and stdin prompt