error logging
wat?   setting dir wasnt needed before