Added logs, error reporting and other functions