Added error and write template examples