diff --git a/src/elpa1/elpa1_compute_template.X90 b/src/elpa1/elpa1_compute_template.X90
index 7d2d586c0ab642f848076e445be37b397e700fda..da3d77610c8bfc9bae3c14ef58cef78688cec866 100644
--- a/src/elpa1/elpa1_compute_template.X90
+++ b/src/elpa1/elpa1_compute_template.X90
@@ -54,6 +54,8 @@
 ! Author: Andreas Marek, MPCDF
 #endif
 
+#include "../sanity.X90"
+
 #if REALCASE == 1
 
 !cannot use __FILE__ because filename with path can be too long for gfortran (max line length)
diff --git a/src/elpa1/elpa1_merge_systems_real_template.X90 b/src/elpa1/elpa1_merge_systems_real_template.X90
index 87f553daca21c710337cc8a04504543cc040b95d..c466ff007b9733caf93e2afe24a76fd13ddc3d1a 100644
--- a/src/elpa1/elpa1_merge_systems_real_template.X90
+++ b/src/elpa1/elpa1_merge_systems_real_template.X90
@@ -52,6 +52,8 @@
 ! distributed along with the original code in the file "COPYING".
 #endif
 
+#include "../sanity.X90"
+
     subroutine merge_systems_&
     &PRECISION &
                          ( na, nm, d, e, q, ldq, nqoff, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, &
diff --git a/src/elpa1/elpa1_solve_tridi_real_template.X90 b/src/elpa1/elpa1_solve_tridi_real_template.X90
index 07c45e4e5080af0e1f0a02e6ff740170295d35a6..1781074c86c6e119f0f0f8964c9dabf898426a6d 100644
--- a/src/elpa1/elpa1_solve_tridi_real_template.X90
+++ b/src/elpa1/elpa1_solve_tridi_real_template.X90
@@ -52,6 +52,8 @@
 ! distributed along with the original code in the file "COPYING".
 #endif
 
+#include "../sanity.X90"
+
 subroutine solve_tridi_&
 &PRECISION &
 ( na, nev, d, e, q, ldq, nblk, matrixCols, mpi_comm_rows, &
diff --git a/src/elpa1/elpa1_template.X90 b/src/elpa1/elpa1_template.X90
index b313896e6021a1735a7473e767ff1ecb1c7ec3f9..86eaa6c8d15830fdfaa234d1688284da6fe50f5b 100644
--- a/src/elpa1/elpa1_template.X90
+++ b/src/elpa1/elpa1_template.X90
@@ -1,3 +1,58 @@
+#if 0
+!    This file is part of ELPA.
+!
+!    The ELPA library was originally created by the ELPA consortium,
+!    consisting of the following organizations:
+!
+!    - Max Planck Computing and Data Facility (MPCDF), formerly known as
+!      Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
+!    - Bergische Universität Wuppertal, Lehrstuhl für angewandte
+!      Informatik,
+!    - Technische Universität München, Lehrstuhl für Informatik mit
+!      Schwerpunkt Wissenschaftliches Rechnen ,
+!    - Fritz-Haber-Institut, Berlin, Abt. Theorie,
+!    - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
+!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
+!      and
+!    - IBM Deutschland GmbH
+!
+!    This particular source code file contains additions, changes and
+!    enhancements authored by Intel Corporation which is not part of
+!    the ELPA consortium.
+!
+!    More information can be found here:
+!    http://elpa.mpcdf.mpg.de/
+!
+!    ELPA is free software: you can redistribute it and/or modify
+!    it under the terms of the version 3 of the license of the
+!    GNU Lesser General Public License as published by the Free
+!    Software Foundation.
+!
+!    ELPA is distributed in the hope that it will be useful,
+!    but WITHOUT ANY WARRANTY; without even the implied warranty of
+!    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+!    GNU Lesser General Public License for more details.
+!
+!    You should have received a copy of the GNU Lesser General Public License
+!    along with ELPA.  If not, see <http://www.gnu.org/licenses/>
+!
+!    ELPA reflects a substantial effort on the part of the original
+!    ELPA consortium, and we ask you to respect the spirit of the
+!    license that we chose: i.e., please contribute any changes you
+!    may have back to the original ELPA library distribution, and keep
+!    any derivatives of ELPA under the same license that we chose for
+!    the original distribution, the GNU Lesser General Public License.
+!
+!
+! ELPA1 -- Faster replacements for ScaLAPACK symmetric eigenvalue routines
+!
+! Copyright of the original code rests with the authors inside the ELPA
+! consortium. The copyright of any additional modifications shall rest
+! with their original authors, but shall adhere to the licensing terms
+! distributed along with the original code in the file "COPYING".
+#endif
+
+#include "../sanity.X90"
 
 function elpa_solve_evp_&
          &MATH_DATATYPE&
diff --git a/src/elpa1/elpa1_tools_template.X90 b/src/elpa1/elpa1_tools_template.X90
index d5809bf77d758666c8a8167cf5bf916d1a3bcb39..def3272ef4e0d4f06764e543ebe0ef33233f953f 100644
--- a/src/elpa1/elpa1_tools_template.X90
+++ b/src/elpa1/elpa1_tools_template.X90
@@ -52,6 +52,8 @@
 ! distributed along with the original code in the file "COPYING".
 #endif
 
+#include "../sanity.X90"
+
 #if REALCASE == 1
 
     subroutine v_add_s_&
diff --git a/src/elpa1/elpa1_trans_ev_template.X90 b/src/elpa1/elpa1_trans_ev_template.X90
index cedc6b251be8fcce5e8092d6464dc35e09a014db..9f74d380c303fd7956d86fa7cf034c69ecd394fe 100644
--- a/src/elpa1/elpa1_trans_ev_template.X90
+++ b/src/elpa1/elpa1_trans_ev_template.X90
@@ -52,6 +52,8 @@
 ! distributed along with the original code in the file "COPYING".
 #endif
 
+#include "../sanity.X90"
+
 !> \brief Transforms the eigenvectors of a tridiagonal matrix back
 !>                     to the eigenvectors of the original matrix
 !>                     (like Scalapack Routine PDORMTR)
diff --git a/src/elpa1/elpa1_tridiag_template.X90 b/src/elpa1/elpa1_tridiag_template.X90
index db59079e13ed9371d3cb88a72358d3a7b2a73641..8a087e3d9e68eebb251e1708f1cfdda38007b69c 100644
--- a/src/elpa1/elpa1_tridiag_template.X90
+++ b/src/elpa1/elpa1_tridiag_template.X90
@@ -81,6 +81,7 @@
 !>
 !> \param useGPU      If true,  GPU version of the subroutine will be used
 !>
+#include "../sanity.X90"
 
     subroutine tridiag_&
     &MATH_DATATYPE&
diff --git a/src/elpa1/elpa_reduce_add_vectors.X90 b/src/elpa1/elpa_reduce_add_vectors.X90
index a1f0d376e2c6a46f744215d2d7af89706da1d82f..780658d9868ee22152f1351d28d9eab795850495 100644
--- a/src/elpa1/elpa_reduce_add_vectors.X90
+++ b/src/elpa1/elpa_reduce_add_vectors.X90
@@ -44,6 +44,7 @@
 #endif
 
 #include "config-f90.h"
+#include "../sanity.X90"
 
 subroutine elpa_reduce_add_vectors_&
 &MATH_DATATYPE&
diff --git a/src/elpa1/elpa_transpose_vectors.X90 b/src/elpa1/elpa_transpose_vectors.X90
index 853f131c6af94da7ef458de954a0dad28e92cece..e7ce3bc307d5bce3d2f0f17d6356bffb41d714c2 100644
--- a/src/elpa1/elpa_transpose_vectors.X90
+++ b/src/elpa1/elpa_transpose_vectors.X90
@@ -48,6 +48,7 @@
 #endif
 
 #include "config-f90.h"
+#include "../sanity.X90"
 
 subroutine elpa_transpose_vectors_&
 &MATH_DATATYPE&