check and finalize build