Avoid loading database when not needed