Wrap signature write in if statement