Added warning on rewrite in progress
Fxed bug on remote being detected, improved variable names
Improved variable name