Change all public API flags parameters from uint16_t to uint32_t
Remove two unused file functions
Add events-occurred callback to file object