Included script to redirect errors to text file

and fixed missing semi