Moved logical connection if checks to the top to throw a IllegalArgumentException since it is required for the method.
Added some debug logging
Don't commit the out folder
Added idea's out folder to the ignore