Change redirect error and output to logfiles