Correcting signature header
Adding better error handling for missing header