Fix to handle locked files

New event ID to log locked files.
New implementation to more detailed exception dump.