Check bashrc last

Should write completion file first and 
read the .bashrc file last because of process exit.