Moved echoing of output outside if statement
Initialized 'output' variable
Merge pull request #6 from martin-hewitt/master

Moved echoing of output outside if statement