Adding complete message
Moving check to outside if
Adding stdout read