change try catch to trap
add previm plugin