Allow stack depth for finding filenames and line numbers to be specified.