Added logging everywhere