Removed waitforme
New log function created
Needs reverting