diff --git a/Stack/History/HistoryObservationPlane.cpp b/Stack/History/HistoryObservationPlane.cpp
index 1109b0fcee5cc0c1f45e626adeeec7c134814257..b1425f18be3ff20fe68f8ffbaf2f6ff9244d6e78 100644
--- a/Stack/History/HistoryObservationPlane.cpp
+++ b/Stack/History/HistoryObservationPlane.cpp
@@ -82,4 +82,3 @@ void HistoryObservationPlane::fillHistoryHistogram(
     event = event->parentEvent().get(); // projectile.GetEvent().get();
   }
 }
-
diff --git a/Tools/plot_tracks.sh b/Tools/plot_tracks.sh
index 4d0844650da4a274471be58f94a882414dfb241f..c8e7fbcd4263146968793b485ea2a411f1aa096b 100755
--- a/Tools/plot_tracks.sh
+++ b/Tools/plot_tracks.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
 #
@@ -20,7 +20,12 @@ directory=$(dirname "$tracks_dat")
 hadrons_dat="$directory/hadrons.dat"
 muons_dat="$directory/muons.dat"
 
-if [ "$muons_dat" -ot "$tracks_dat" -o "$hadrons_dat" -ot "$muons_dat" ]; then
+if [ ! -e "$tracks_dat" ]; then
+  echo "$tracks_dat does not exist" >&2
+  exit 2
+fi
+
+if [ "$muons_dat" -ot "$tracks_dat" ] || [ "$hadrons_dat" -ot "$tracks_dat" ]; then
   echo "splitting $tracks_dat into $muons_dat and $hadrons_dat."
   cat "$tracks_dat" | egrep '^\s+-*13\s' > "$muons_dat"
   cat "$tracks_dat" | egrep -v '^\s+-*13\s' > "$hadrons_dat"