source-output: Add exception handling