binary build script only writes to file in debug