noise detection writes last amplitude to file