Removed some printf-spam. Prepared for error logging