Revert "enable before open callback function"

This reverts commit 1c135a95c75c82302dff7c49104fc1913643f8d5.