Feature/return file before revalidation and code cleanup