Format & filename fix
Refactoring, add hook option