added printimage function, log message function and first results of analysis