Remove unecessary process.exit call
Move apply replacements logic to logger