Updated to remove warnings and take photos automatically