add main options: -frames, -q
improve possible cases with NPE