Refactor scons file
Add fprintf indirection layer