Replaced awk with gawk (managed to unlock file at last).