Use with_items for repetitive tasks; Add more checks