Changed umask to a smaller section of the code to prevent it from affecting files made by the subprocess