install anywhere: moved require framework inside if