Fix inventory check script to add newline