Removed parameter from checkDir() which led to string directory1/2 being assigned and then re-assigned by the return value. Also changed wrongdir's value to 0.