         const float maskedAbsMax = cudaVectorMax( dpIsMasked, nElements, rStream );
         const float maskedThreshold = rIntensityCutOffAutoCorel * maskedAbsMax;
         cudaKernelCutOff<<<nBlocks,nThreads,0,rStream>>>( dpIsMasked, nElements, maskedThreshold, 1.0f, 0.0f );
+        CUDA_ERROR( cudaPeekAtLastError() );
 
         /* copy original image into fftw_complex array @todo: add random phase */
         cudaKernelCopyToRealPart<<<nBlocks,nThreads,0,rStream>>>( dpCurData, dpIntensity, nElements );
+        CUDA_ERROR( cudaPeekAtLastError() );
 
         /* in the first step the last value for g is to be approximated
          * by g'. The last value for g, called g_k is needed, because

#    include <fftw3.h>    // kinda problematic to mix this with cufft, but should work if it isn't cufftw.h
#    include "algorithms/vectorReduce.hpp"
#    include "algorithms/vectorElementwise.hpp"
#endif
#include "libs/cudacommon.hpp"
#include "libs/checkCufftError.hpp"

                /* apply domain constraints to g' to get g */
                cudaKernelApplyHioDomainConstraints<<<nBlocks,nThreads,0,rStream >>>
                    ( dpgPrevious, dpCurData, dpIsMasked, nElements, rHioBeta );
                CUDA_ERROR( cudaPeekAtLastError() );

                /* Transform new guess g for f back into frequency space G' */
                CUFFT_ERROR( cufftExecC2C( ftPlan, dpgPrevious, dpCurData, CUFFT_FORWARD ) );
