Modified statement to echo to both log file and

standard out. This ensures that the message can be seen in both places.
Also changed to a multiline if statement instead of a one line
statement.