Removed trap and Restore_LC_ALL function for a safer equivalent.