added cmd line flag for custom critical value