Added comments to check_parameters()
Added call of check_parameters() to main()
Added count of errors to check_parameters()
Fixed error in check_parameters
Removed useless lines