Add pre and post commands to fix #54