put autoload handler at bottom to avoid potential problems with autoloading after the app is ready