Logging and assert

Added form logging
Removed Assert and replaced with assert