Move errors into separate file
Raise errors when invalid paging options are given