fixed missing output due to bash option `-e`