Validate inputs/additional debug/error checking