added option for crc32 checksum calculation and did some code cleanup. some one liner had way to long error handling