added pre-checking before stripping
skip empty files
open new instance
pep8 changes