Add try-except to print output to console

Did this in order to keep the Codeship build from failing prematurely
due to lack of content printed to the console.