Using callback in writelog