Refactored the before and after hooks to use linux commands instead of actions.