fix whitespace errors + add check hookscript

Reviewer: @rlane