Fix multiple shell type compatibillity
There is a lot of different shell types which works in different ways. We need to support them all. Also, let's get some logging in here.