Add -P option support