Optimized filter to only run then options are given.
Fixed bug in which directory should be created to late.