Updated static path determination to only run when creating a new handler.