added 3*prestim as end time in get_latency and error message when no peaks are found inside given bound